<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: BlHost Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_bl_host.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_bl_host-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">BlHost Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class that encapsulates the blhost tool.  
 <a href="class_bl_host.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for BlHost:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="class_bl_host__coll__graph.svg" width="419" height="322"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0c3f039eea8b62684c1165e90868d007"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a0c3f039eea8b62684c1165e90868d007">BlHost</a> (int argc, char *argv[])</td></tr>
<tr class="separator:a0c3f039eea8b62684c1165e90868d007"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61498a35ba01032c4d7e13f028b84c83"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a61498a35ba01032c4d7e13f028b84c83"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a61498a35ba01032c4d7e13f028b84c83">~BlHost</a> ()</td></tr>
<tr class="memdesc:a61498a35ba01032c4d7e13f028b84c83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a61498a35ba01032c4d7e13f028b84c83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f6e10f6e2286a9402a419933aa1a31c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f6e10f6e2286a9402a419933aa1a31c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a9f6e10f6e2286a9402a419933aa1a31c">run</a> ()</td></tr>
<tr class="memdesc:a9f6e10f6e2286a9402a419933aa1a31c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run the application. <br /></td></tr>
<tr class="separator:a9f6e10f6e2286a9402a419933aa1a31c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aa814fafb5e5cb16cfd2940e4a4cf13e8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa814fafb5e5cb16cfd2940e4a4cf13e8"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#aa814fafb5e5cb16cfd2940e4a4cf13e8">processOptions</a> ()</td></tr>
<tr class="memdesc:aa814fafb5e5cb16cfd2940e4a4cf13e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process command line options. <br /></td></tr>
<tr class="separator:aa814fafb5e5cb16cfd2940e4a4cf13e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:afe397ce7d8badf17b396a39025432103"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe397ce7d8badf17b396a39025432103"></a>
static BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#afe397ce7d8badf17b396a39025432103">ctrlHandler</a> (DWORD ctrlType)</td></tr>
<tr class="memdesc:afe397ce7d8badf17b396a39025432103"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handler for Ctrl signals. <br /></td></tr>
<tr class="separator:afe397ce7d8badf17b396a39025432103"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa27eda57aea28e517510b6451fff35bc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa27eda57aea28e517510b6451fff35bc"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>ctrlPlusCHandler</b> (int msg)</td></tr>
<tr class="separator:aa27eda57aea28e517510b6451fff35bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3812e8f65ff967a2329635dd39bcbc4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3812e8f65ff967a2329635dd39bcbc4"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>displayProgress</b> (int percentage, int segmentIndex, int segmentCount)</td></tr>
<tr class="separator:ab3812e8f65ff967a2329635dd39bcbc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a5c9a482263a5d201a71a4a32af6dd24c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c9a482263a5d201a71a4a32af6dd24c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a5c9a482263a5d201a71a4a32af6dd24c">m_argc</a></td></tr>
<tr class="memdesc:a5c9a482263a5d201a71a4a32af6dd24c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of command line arguments. <br /></td></tr>
<tr class="separator:a5c9a482263a5d201a71a4a32af6dd24c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a37bf476e12f9f98b42ee47125fc78d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8a37bf476e12f9f98b42ee47125fc78d"></a>
char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a8a37bf476e12f9f98b42ee47125fc78d">m_argv</a></td></tr>
<tr class="memdesc:a8a37bf476e12f9f98b42ee47125fc78d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command line arguments. <br /></td></tr>
<tr class="separator:a8a37bf476e12f9f98b42ee47125fc78d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a575ab55a440659870a64814eb08e517a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a575ab55a440659870a64814eb08e517a"></a>
string_vector_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a575ab55a440659870a64814eb08e517a">m_cmdv</a></td></tr>
<tr class="memdesc:a575ab55a440659870a64814eb08e517a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command line argument vector. <br /></td></tr>
<tr class="separator:a575ab55a440659870a64814eb08e517a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32f8d13c33b6376c3d6a254d71b5384c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a32f8d13c33b6376c3d6a254d71b5384c"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a32f8d13c33b6376c3d6a254d71b5384c">m_comPort</a></td></tr>
<tr class="memdesc:a32f8d13c33b6376c3d6a254d71b5384c"><td class="mdescLeft">&#160;</td><td class="mdescRight">COM port to use. <br /></td></tr>
<tr class="separator:a32f8d13c33b6376c3d6a254d71b5384c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13699631fa170e486e996215b753085c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a13699631fa170e486e996215b753085c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a13699631fa170e486e996215b753085c">m_comSpeed</a></td></tr>
<tr class="memdesc:a13699631fa170e486e996215b753085c"><td class="mdescLeft">&#160;</td><td class="mdescRight">COM port speed. <br /></td></tr>
<tr class="separator:a13699631fa170e486e996215b753085c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a143d2c72efcd5be93872b4029b10e353"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a143d2c72efcd5be93872b4029b10e353"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a143d2c72efcd5be93872b4029b10e353">m_useBusPal</a></td></tr>
<tr class="memdesc:a143d2c72efcd5be93872b4029b10e353"><td class="mdescLeft">&#160;</td><td class="mdescRight">True if using BusPal peripheral. <br /></td></tr>
<tr class="separator:a143d2c72efcd5be93872b4029b10e353"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d170fa4785e5cde944e9db6b1c4b9df"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d170fa4785e5cde944e9db6b1c4b9df"></a>
string_vector_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a8d170fa4785e5cde944e9db6b1c4b9df">m_busPalConfig</a></td></tr>
<tr class="memdesc:a8d170fa4785e5cde944e9db6b1c4b9df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bus pal peripheral-specific argument vector. <br /></td></tr>
<tr class="separator:a8d170fa4785e5cde944e9db6b1c4b9df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22a8015d3f97ae768ad7080b8d5eaa82"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a22a8015d3f97ae768ad7080b8d5eaa82"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a22a8015d3f97ae768ad7080b8d5eaa82">m_useUsb</a></td></tr>
<tr class="memdesc:a22a8015d3f97ae768ad7080b8d5eaa82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect over USB HID. <br /></td></tr>
<tr class="separator:a22a8015d3f97ae768ad7080b8d5eaa82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5061d86c6fed4fb09680b92818aacf83"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5061d86c6fed4fb09680b92818aacf83"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a5061d86c6fed4fb09680b92818aacf83">m_useUart</a></td></tr>
<tr class="memdesc:a5061d86c6fed4fb09680b92818aacf83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect over UART. <br /></td></tr>
<tr class="separator:a5061d86c6fed4fb09680b92818aacf83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4d741f3de3eb9a64423e256a3acdd9a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4d741f3de3eb9a64423e256a3acdd9a"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#ae4d741f3de3eb9a64423e256a3acdd9a">m_usbVid</a></td></tr>
<tr class="memdesc:ae4d741f3de3eb9a64423e256a3acdd9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">USB VID of the target HID device. <br /></td></tr>
<tr class="separator:ae4d741f3de3eb9a64423e256a3acdd9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adce56d7696a7847d7df6b2f075ee89f0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adce56d7696a7847d7df6b2f075ee89f0"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#adce56d7696a7847d7df6b2f075ee89f0">m_usbPid</a></td></tr>
<tr class="memdesc:adce56d7696a7847d7df6b2f075ee89f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">USB PID of the target HID device. <br /></td></tr>
<tr class="separator:adce56d7696a7847d7df6b2f075ee89f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8bcacffab3280198ea3fc259b61f364"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad8bcacffab3280198ea3fc259b61f364"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#ad8bcacffab3280198ea3fc259b61f364">m_ping</a></td></tr>
<tr class="memdesc:ad8bcacffab3280198ea3fc259b61f364"><td class="mdescLeft">&#160;</td><td class="mdescRight">If true will not send the initial ping to a serial device. <br /></td></tr>
<tr class="separator:ad8bcacffab3280198ea3fc259b61f364"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad614847701e18eea9d883a0dd1f116b6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad614847701e18eea9d883a0dd1f116b6"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#ad614847701e18eea9d883a0dd1f116b6">m_packetTimeoutMs</a></td></tr>
<tr class="memdesc:ad614847701e18eea9d883a0dd1f116b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Packet timeout in milliseconds. <br /></td></tr>
<tr class="separator:ad614847701e18eea9d883a0dd1f116b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91c11a0f10b017a3c8ff736ef1b03e1c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91c11a0f10b017a3c8ff736ef1b03e1c"></a>
ping_response_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a91c11a0f10b017a3c8ff736ef1b03e1c">m_pingResponse</a></td></tr>
<tr class="memdesc:a91c11a0f10b017a3c8ff736ef1b03e1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Response to initial ping. <br /></td></tr>
<tr class="separator:a91c11a0f10b017a3c8ff736ef1b03e1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a041b571a85fb2fc87893595a16bbeef6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a041b571a85fb2fc87893595a16bbeef6"></a>
<a class="el" href="group__logging.html#class_stdout_logger">StdoutLogger</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_bl_host.html#a041b571a85fb2fc87893595a16bbeef6">m_logger</a></td></tr>
<tr class="memdesc:a041b571a85fb2fc87893595a16bbeef6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Singleton logger instance. <br /></td></tr>
<tr class="separator:a041b571a85fb2fc87893595a16bbeef6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class that encapsulates the blhost tool. </p>
<p>A single global logger instance is created during object construction. It is never freed because we need it up to the last possible minute, when an exception could be thrown. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a0c3f039eea8b62684c1165e90868d007"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">BlHost::BlHost </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>argv</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor.</p>
<p>Creates the singleton logger instance. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>blhost.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_bl_host.html">BlHost</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:50 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
